package com.ruoyi.system.domain;

import com.ruoyi.common.core.domain.entity.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 省市区管理对象 sys_area
 * 
 * @author ruoyi
 * @date 2024-11-11
 */
public class SysArea extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 地区ID */
    private Long areaId;

    /** 父ID */
    @Excel(name = "父ID")
    private Long parentId;

    /** 地区名称 */
    @Excel(name = "地区名称")
    private String areaName;

    /** 地区码 */
    @Excel(name = "地区码")
    private String areaCode;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    private List<SysArea> children = new ArrayList<SysArea>();

    public void setAreaId(Long areaId) 
    {
        this.areaId = areaId;
    }

    public Long getAreaId() 
    {
        return areaId;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setAreaName(String areaName) 
    {
        this.areaName = areaName;
    }

    public String getAreaName() 
    {
        return areaName;
    }
    public void setAreaCode(String areaCode) 
    {
        this.areaCode = areaCode;
    }

    public String getAreaCode() 
    {
        return areaCode;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }

    public List<SysArea> getChildren()
    {
        return children;
    }

    public void setChildren(List<SysArea> children)
    {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("areaId", getAreaId())
            .append("parentId", getParentId())
            .append("areaName", getAreaName())
            .append("areaCode", getAreaCode())
            .append("sort", getSort())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
